package com.acmedcare.framework.exchange.center.executer;

import com.acmedcare.framework.exchange.center.entity.dto.Hdfs;
import com.acmedcare.framework.starter.bus.AcmedcareEventPublisher;
import org.quartz.Scheduler;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.ApplicationContext;

@ConfigurationProperties(prefix = "data.center")
public class ExecutorConfig {

  public static final String TASKINFO = "TASKINFO";

  public static final String TASKGROUP = "TASKGROUP";

  public static final String EXCHANGENAME = "EXCHANGE-CENTER";

  private static ExecutorConfig instance;

  public static final String RUN_STATUS = "RUN_STATUS";

  private Scheduler scheduler;

  private ApplicationContext applicationContext;

  private  String shellPath;

  private  String drivePath;

  private  String masterUri;

  private String fileRootPath;

  private String executorName;

  private String groupName;

  private AcmedcareEventPublisher acmedcareEventPublisher;

  private Hdfs hdfs;


  public void init() {
    instance = this;
  }

  public static ExecutorConfig getInstance() {

    return instance;
  }

  public ApplicationContext getApplicationContext() {
    return applicationContext;
  }

  public void setApplicationContext(ApplicationContext applicationContext) {
    this.applicationContext = applicationContext;
  }

  public Scheduler getScheduler() {
    return scheduler;
  }

  public void setScheduler(Scheduler scheduler) {
    this.scheduler = scheduler;
  }

  public String getShellPath() {
    return shellPath;
  }

  public void setShellPath(String shellPath) {
    this.shellPath = shellPath;
  }

  public String getDrivePath() {
    return drivePath;
  }

  public void setDrivePath(String drivePath) {
    this.drivePath = drivePath;
  }

  public String getMasterUri() {
    return masterUri;
  }

  public void setMasterUri(String masterUri) {
    this.masterUri = masterUri;
  }

  public String getFileRootPath() {
    return fileRootPath;
  }

  public void setFileRootPath(String fileRootPath) {
    this.fileRootPath = fileRootPath;
  }

  public String getExecutorName() {
    return executorName;
  }

  public void setExecutorName(String executorName) {
    this.executorName = executorName;
  }

  public String getGroupName() {
    return groupName;
  }

  public void setGroupName(String groupName) {
    this.groupName = groupName;
  }

  public AcmedcareEventPublisher getAcmedcareEventPublisher() {
    return acmedcareEventPublisher;
  }

  public void setAcmedcareEventPublisher(
      AcmedcareEventPublisher acmedcareEventPublisher) {
    this.acmedcareEventPublisher = acmedcareEventPublisher;
  }

  public Hdfs getHdfs() {
    return hdfs;
  }

  public void setHdfs(Hdfs hdfs) {
    this.hdfs = hdfs;
  }
}
